import { defineComponent, watch } from "vue";
import { RouterView } from "vue-router";
import Head from "./components/head";
import Tail from "./components/tail";
import { useRoute } from 'vue-router'
import './initialize.less';

export default defineComponent({
  setup() {
    const route = useRoute()
    watch(() => route.path, () => {
      window.scrollTo({
        top: 0,
      });
    })
    return () => (
      <div id="reactor">
        <Head />
        <RouterView />
        <Tail />
      </div>
    )
  }
})